<header id="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-active">
                <a href="#preset/lottery/">可用彩种全局配置</a>
            </li>
        </ol>
    </div>
    <div class="topbar-right">
        <a href="#preset/lottery/add/" class="btn btn-default btn-sm light fw600 ml10"><span class="fa fa-plus pr5"></span>新增配置</a>
        <div class="ml15 ib va-m" id="toggle_sidemenu_r">
            <a href="#" class="pl5"> <i class="fa fa-sign-in fs22 text-primary"></i>
            </a>
        </div>
    </div>
</header>

<section id="content" class="animated fadeIn">
    <div class="panel overflow" >
        <table class="table table-striped fs13" id="main-list">
            <thead>
                <tr class="bg-light">
                    <th>ID</th>
                    <th class="sortable" data-field="priority">彩种</th>
                    <th>图标</th>
                    <th>生效时间</th>
                    <th>结束时间</th>
                    <th class="sortable" data-field="priority">优先级</th>
                    <th class="sortable" data-field="sort_id">顺序</th>
                    <th>适配版本</th>
                    <th>适配设备</th>
                    <th>最后修改时间</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody class="admin-form">
                <% var moment = require('moment'); %>
                <% _.each(lotterys, function(lottery){ %>
                    <tr data-id="<%= lottery.id %>" >
                        <td><a href="#preset/lottery/<%= lottery.id %>/" ><%= lottery.id %></a></td>
                        <td><%= window.NEW_LOTTERY_TYPE[lottery.type] %></td>
                        <td>
                            <img src="<%= lottery.image %>" alt="" height="50">
                        </td>
                        <td><%= lottery.start_ts %></td>
                        <td><%= lottery.end_ts %></td>
                        <td><%= lottery.priority %></td>
                        <td><%= lottery.sort_id %></td>
                        <td><%= lottery.min_cvc %> ~ <%= lottery.max_cvc %> </td>
                        <td>
                            <% _.each(window.DEVICE_TYPE, function(v, k){ %>
                                <% if (parseInt(k) & lottery.device_type){ %>
                                    <span> <%= v %> </span>
                           <% }}) %>
                        </td>
                        <td><%= lottery.updated_at %></td>
                        <td class="text-left">
                            <a class="glyphicons glyphicons-pencil" href="#preset/lottery/<%= lottery.id %>/"></a>
                            <a class="glyphicons glyphicons-remove_2 onClickDelete" href="javascript:;"></a>
                        </td>
                    </tr>
                <%
                }) %>
            </tbody>
        </table>
    </div>

    <div><div class="pull-left" id="page-tips"></div><div id="paginator"></div></div>
</section>

<!-- Start: Right Sidebar -->
